<?php
    include "users_credit.php";


$username=$_REQUEST['username'];
$credit=$_REQUEST['credit'];

mysqli_select_db($conn,"shopping");

$sql = "update credit set `credit` = '$credit' where username='$username'";  //SQL模板

//SQL模板

   $result=mysqli_query($conn,$sql);

    if (!$result){
        echo '数据更新失败！';
    }else{
        echo '数据更新成功！';
    }
    
    mysqli_close($conn);
?>
